package cn.bone.ou.myuser.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class ErrorPageController {

    @RequestMapping("/400")
    public String error400(HttpServletRequest request){
        request.setAttribute("code","400");
        return "/my/error";
    }

    @RequestMapping("/401")
    public String error401(HttpServletRequest request){
        request.setAttribute("code","401");
        return "/my/error";
    }

    @RequestMapping("/402")
    public String error402(HttpServletRequest request){
        request.setAttribute("code","402");
        return "/my/error";
    }

    @RequestMapping("/403")
    public String error403(HttpServletRequest request){
        request.setAttribute("code","403");
        return "/my/error";
    }

    @RequestMapping("/404")
    public String error404(HttpServletRequest request){
        request.setAttribute("code", "404");
        return "/my/error";
    }
}
